package fractal;

import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 * User: ilya
 * Date: 24.09.11
 * Time: 16:45
 */
public class GrayPalette implements Palette {

    private final Color[] palette;

    public GrayPalette() {
        palette = new Color[256];
        for (int i = 0; i < 256; i++) {
            int gr = 255 - i;
            palette[i] = new Color(gr, gr, gr);
        }
    }

    public Color getColor(int value) {
        return palette[value];
    }
}
